package com.classic.common.simple;

import com.classic.common.MultipleStatusView;
import ohos.agp.components.ListContainer;

import java.util.Arrays;

public class ListActivity extends AbsActivity {
    private ListContainer mRecyclerView;
    private EasyListProvider mNewsAdapter;
    private String[] data = new String[]{"1", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2"};

    @Override
    void initView() {
        setUIContent(ResourceTable.Layout_activity_list);
        mMultipleStatusView = (MultipleStatusView) findComponentById(ResourceTable.Id_list_multiple_status_view);
        mRecyclerView = (ListContainer) mMultipleStatusView.findComponentById(ResourceTable.Id_recycler_view);
        mNewsAdapter = new EasyListProvider(this, Arrays.asList(data));
        mRecyclerView.setItemProvider(mNewsAdapter);
        loading();
    }
}
